package com.slz3.business.module.messageManagement.mesTemplate.domain;

import com.slz3.business.frame.annotation.ConfigDomain;
import com.slz3.business.module.messageManagement.mesTemplate.repository.MesTemplateRepository;
import com.slz3.business.module.messageManagement.mesType.domain.MesType;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

@ConfigDomain(repositoryClass = MesTemplateRepository.class)
@Entity
@Table(schema = "message_management", name = "mes_template")
@Data
@EqualsAndHashCode(callSuper = true)
public class MesTemplate extends MesTemplateEntity implements Serializable {

    private static final long serialVersionUID = 3928173855627287110L;

    /**
     * 自增 Long
     */
    @Column(insertable = false)
    @ColumnDefault("nextval('mishang_old_frame_id_seq')")
    private Long incrementId;
    /**
     * 消息类型
     */
    private MesType mesType;

}
